package forms;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.SafeHtml;
import org.hibernate.validator.constraints.SafeHtml.WhiteListType;

import security.UserAccount;
import domain.CreditCard;

public class ParticipantForm {
	// Attributes ---------------------------------------------------------
		private UserAccount userAccount;
		private String repeatedPassword, name, surname, email;
		private Boolean hasAccepted;
		private int id, version;
		private CreditCard creditCard;
		
		// Constructor --------------------------------------------------------
		public ParticipantForm(){
			super();
		}

		// Getters and setters ------------------------------------------------
		@Valid
		@NotNull
		public UserAccount getUserAccount() {
			return userAccount;
		}

		public void setUserAccount(UserAccount userAccount) {
			this.userAccount = userAccount;
		}

		public String getRepeatedPassword() {
			return repeatedPassword;
		}

		public void setRepeatedPassword(String repeatedPassword) {
			this.repeatedPassword = repeatedPassword;
		}

		public Boolean getHasAccepted() {
			return hasAccepted;
		}

		public void setHasAccepted(Boolean hasAccepted) {
			this.hasAccepted = hasAccepted;
		}

		public int getId() {
			return id;
		}

		public void setId(int id) {
			this.id = id;
		}

		public int getVersion() {
			return version;
		}

		public void setVersion(int version) {
			this.version = version;
		}
		@NotBlank
		@SafeHtml(whitelistType = WhiteListType.NONE)
		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}
		@NotBlank
		@SafeHtml(whitelistType = WhiteListType.NONE)
		public String getSurname() {
			return surname;
		}

		public void setSurname(String surname) {
			this.surname = surname;
		}
		@Email
		@SafeHtml(whitelistType = WhiteListType.NONE)
		public String getEmail() {
			return email;
		}

		public void setEmail(String email) {
			this.email = email;
		}
		
		@NotNull
		@Valid
		public CreditCard getCreditCard() {
			return creditCard;
		}

		public void setCreditCard(CreditCard creditCard) {
			this.creditCard = creditCard;
		}
		
}